#生成一张黄色全屏的图片
import cv2
import numpy as np
import tkinter as tk

root = tk.Tk()
screen_width = int(root.winfo_screenwidth() * 0.8)
screen_height = int(root.winfo_screenheight() * 0.8)
print(f"屏幕分辨率：{screen_width} x {screen_height}")

img = np.zeros(( screen_height,screen_width,3), np.uint8)
img[:] = (0,255,255) #设置背景为黄色
cv2.imshow("image", img)
cv2.waitKey(0)
cv2.imwrite("../img/yellow.jpg", img)
cv2.destroyAllWindows()


